﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Mapenect.Data;

namespace Mapenect.Tests
{
    [TestFixture]
    class MyVectorTester
    {
        MyVector vect1;
        MyVector vect2;

        [SetUp]
        public void init()
        {
            vect1 = new MyVector(4.0f, 2.0f, 1.0f);
            vect2 = new MyVector(-8.0f, 4.0f, 2.0f);
        }

        [Test]
        public void TestIt()
        {
            Console.WriteLine("Ausgangswerte");
            Console.WriteLine(vect1.GetString());
            Console.WriteLine(vect2.GetString());
            Console.WriteLine("-------------------");

            Console.WriteLine("Normierung");
            MyVector vect1Norm = vect1.Normalize();
            MyVector vect2Norm = vect2.Normalize();

            Console.WriteLine(vect1Norm.GetString());
            Console.WriteLine(vect2Norm.GetString());
            Console.WriteLine("-------------------");

            Boolean test = vect1.CompareTo(vect2, 0.1f);

            if (test) Console.WriteLine("Test erfolgreich");

            Console.WriteLine("Addieren");
            vect1.AddVector(vect2);
            Console.WriteLine(vect1.GetString());
        }
    }
}
